/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/' + id,
    method: 'delete'
  })
}


export function deleteBatch(query) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/deleteBatch',
    method: 'get',
    params: query
  })
}

export function putObj(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb',
    method: 'put',
    data: obj
  })
}

export function saveGrjcjlbList(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/saveGrjcjlbList',
    method: 'post',
    data: obj
  })
}
export function bath(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/bath',
    method: 'post',
    data: obj
  })
}

export function getGrjcByFfid(id) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/getGrjcByFfid/' + id,
    method: 'get'
  })
}
//获取新增人员选择人员列表时的组织机构
export function jjPersonTree() {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/jjPersonTree',
    method: 'get'
  })
}

export function getjjxBydept(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/getjjxBydept',
    method: 'get',
  })
}

export function savejcData(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/savejcData',
    method: 'post',
    data: obj
  })
}

export function getJjxData(query) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/getJjxData',
    method: 'get',
    params: query
  })
}

export function getGrjcjlbData(query) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/getGrjcjlbData',
    method: 'get',
    params: query
  })
}

export function saveGrjcjlbData(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/saveGrjcjlbData',
    method: 'post',
    data: obj
  })
}

export function ryjcfj(id) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/'+id,
    method: 'get',
  })
}

export function ryjcfjHq(obj) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb',
    method: 'put',
    data:obj
  })
}

export function getRqList() {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/getRqList',
    method: 'get',
  })
}

export function getDataList(query) {
  return request({
    url: '/jiangjin/jiangjingrjcjlb/getDataList',
    method: 'get',
    params: query
  })
}